const path = require("path");
const { getFileType } = require("./fileType");
// 获取icon的路径
const getIconPath = (ext) => {
  const [type, ex] = getFileType(ext);
  let result = `/imgs/${type}.png`;
  if (["image", "video"].includes(type)) {
    if (!["bmp"].includes(ex)) {
      result = "";
    }
  }
  return result;
};
module.exports = {
  getIconPath,
};
